<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:78:"D:\phpStudy\WWW\qybaowap\public/../application/index\view\coupons\coupons.html";i:1513850516;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <script src="__STATIC__/js/base.js"></script>
    <title>订单列表</title>
    <link rel="stylesheet" href="__STATIC__/css/base.css">
    <link rel="stylesheet" href="__STATIC__/css/userinfo.css">
    <link rel="stylesheet" href="__STATIC__/css/orderlist.css">
    <script src="__STATIC__/js/jquery-1.11.1.min.js"></script>
    <!--<script src="js/index.js"></script>-->
</head>
<body>
<section class="wrap">
    <div class="coupons-list-title-fix" >
       <div class=" coupons-list-title clearfix">
           <div class="pull-left "><span class="active" id="unused">未使用</span></div>
           <div class="pull-left"><span id="used">已使用</span></div>
           <div class="pull-left"><span id="overdue">已过期</span></div>
       </div>
    </div>
    <div class="coupons-list-info">
        <ul class="coupons-list-index">
            <!--已使用过-->
            <?php if(is_array($used) || $used instanceof \think\Collection || $used instanceof \think\Paginator): $i = 0; $__LIST__ = $used;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$can): $mod = ($i % 2 );++$i;?>
            <li class="coupons_status_used clearfix">
                <div class="pull-left">
                    <span>2017.09.28  11:23:33  </span>
                    <span> <?php if($can['categoryName']  == '全品'): ?>
                        全品券<?php else: ?>专项券
                        <?php endif; ?></span></span>
                    <span>
                        <?php if($can['categoryName']  == '全品'): ?>
                        通用券<?php else: ?>仅限购买<?php echo $can['categoryName']; ?>类服务
                        <?php endif; ?>
                    </span>
                </div>
                <div class="pull-left">
                    <?php if($can['couponClass']  == 0): ?>
                    <span style="margin-top: 1.5rem"><?php echo floor($can['amount']); ?>折</span>
                    <!--<span><a href="#" class="coupons-use">立即使用</a></span>-->
                    <?php endif; if($can['couponClass']  == 1): ?>
                    <span style="margin-top:0.52rem"><?php echo floor($can['amount']); ?></span>
                    <span>
                        <?php if($can['initialAmount']  == null or $can['initialAmount']  == '0'): ?>无金额门槛
                    <?php else: ?> 满 <?php echo floor($can['initialAmount']); ?>元使用
                    <?php endif; ?>
                    </span>
                    <?php endif; ?>
                    <span>已使用</span>
                </div>
            </li>
            <?php endforeach; endif; else: echo "" ;endif; ?>
            <!--已过期-->
            <?php if(is_array($expiry) || $expiry instanceof \think\Collection || $expiry instanceof \think\Paginator): $i = 0; $__LIST__ = $expiry;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$can): $mod = ($i % 2 );++$i;?>
            <li class="coupons_status_overdue clearfix">
                <div class="pull-left">
                    <span>2017.09.28  11:23:33  </span>
                    <span> <?php if($can['categoryName']  == '全品'): ?>
                        全品券<?php else: ?>专项券
                        <?php endif; ?></span></span>
                    <span>
                        <?php if($can['categoryName']  == '全品'): ?>
                        通用券<?php else: ?>仅限购买<?php echo $can['categoryName']; ?>类服务
                        <?php endif; ?>
                    </span>
                </div>
                <div class="pull-left">
                    <?php if($can['couponClass']  == 0): ?>
                    <span style="margin-top: 1.5rem"><?php echo floor($can['amount']); ?>折</span>
                    <!--<span><a href="#" class="coupons-use">立即使用</a></span>-->
                    <?php endif; if($can['couponClass']  == 1): ?>
                    <span style="margin-top:0.52rem"><?php echo floor($can['amount']); ?></span>
                    <span>
                        <?php if($can['initialAmount']  == null or $can['initialAmount']  == '0'): ?>无金额门槛
                    <?php else: ?> 满 <?php echo floor($can['initialAmount']); ?>元使用
                    <?php endif; ?>
                    </span>
                    <?php endif; ?>
                    <span>已过期</span>
                </div>
            </li>
            <?php endforeach; endif; else: echo "" ;endif; ?>
            <!--未使用过-->
            <?php if(is_array($canUse) || $canUse instanceof \think\Collection || $canUse instanceof \think\Paginator): $i = 0; $__LIST__ = $canUse;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$can): $mod = ($i % 2 );++$i;?>
            <li class="coupons_status_unused">
                <div class="pull-left">
                    <span><lable>2017.09.28到期</lable></span>
                    <span>  <?php if($can['categoryName']  == '全品'): ?>
                        全品券<?php else: ?>专项券
                        <?php endif; ?></span>
                    <span>
                        <?php if($can['categoryName']  == '全品'): ?>
                        通用券<?php else: ?>仅限购买<?php echo $can['categoryName']; ?>类服务
                        <?php endif; ?>
                    </span>
                </div>
                <div class="pull-left">
                    <?php if($can['couponClass']  == 0): ?>
                    <span style="margin-top: 1.5rem"><?php echo floor($can['amount']); ?>折</span>
                    <!--<span><a href="#" class="coupons-use">立即使用</a></span>-->
                    <?php endif; if($can['couponClass']  == 1): ?>
                    <span style="margin-top: 1.32rem"><?php echo floor($can['amount']); ?></span>
                    <span>
                        <?php if($can['initialAmount']  == null or $can['initialAmount']  == '0'): ?>无金额门槛
                    <?php else: ?> 满 <?php echo floor($can['initialAmount']); ?>元使用
                    <?php endif; ?>
                    </span>
                    <?php endif; ?>
                </div>
                <!--<div class="coupons-type">满减券</div>-->
            </li>
            <?php endforeach; endif; else: echo "" ;endif; ?>
        </ul>
        <script>
            $(function(){
              $('.coupons-list-info .coupons_status_unused').show();
              $('.coupons-list-title div span').on('click',function(){
                  $('.coupons-list-title div span').removeClass('active');
                  $(this).addClass('active');
                  var id = $(this).attr('id');
                  $('.coupons-list-info li').hide();
                  if(id == 'unused'){
                      $('.coupons-list-info .coupons_status_unused').show();
                  }
                  if(id == 'used'){
                      $('.coupons-list-info .coupons_status_used').show();
                  }
                  if(id == 'overdue'){
                      $('.coupons-list-info .coupons_status_overdue').show();
                  }
              });
            });
        </script>
    </div>
</section>

</body>
</html>